package string;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String line = "abc123def456asd";
        line = line.replaceAll("[0-9]+","#NUMBER#");
        System.out.println(line);

        String regex = "(gun|sb|fuck)";
        String message = "你sb,gun吧";
        message = message.replaceAll(regex,"***");
        System.out.println(message);
    }
}
